<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page trimDirectiveWhitespaces="true" %>
<%@ page import="com.park.layout.Blocks" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%-- JSTL表达式（判断，循环，输出） --%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%-- 方法表达式（字符串截取，替换） --%>
<%@ taglib uri="http://www.wanwei.com/tags/tag" prefix="layout" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<layout:override name="<%=Blocks.BLOCK_HEADER_CSS%>">
    <link href="Content/style/common/style.min.css?v=${static_resource_version}" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="css/redactor.css" />
</layout:override>

<layout:override name="<%=Blocks.BLOCK_HEADER_SCRIPTS%>">
    <script src="Content/lib/jquery/jquery.validate/jquery.validate.js?v=${static_resource_version}"></script>
    <script src="Content/lib/jquery/jquery.validate.unobtrusive/jquery.validate.unobtrusive.js?v=${static_resource_version}"></script>
    <script src="Content/app/comment/comment_settings.js?v=${static_resource_version}"></script>
    <script src="js/jquery-1.8.2.min.js"></script>
    <script src="js/global.js"></script>
    <script src="js/redactor.js"></script>
    <script src="js/prettify.js"></script>
    <script src="js/zh_cn.js"></script>
    <script>
        $(document).ready(function () {
            // 配置表单校验
            $('#good_form').validate({
                ignore: ":hidden"
            });
        });
    </script>
</layout:override>

<layout:override name="<%=Blocks.BLOCK_BODY%>">
    <div class="container-fluid" style="text-align: left">
        <iframe id="good_form_target" name="goodFormTarget" style="display: none;"></iframe>
        <form id="good_form" class="form-horizontal" action="<%=basePath%>comment/saveReply" method="post" novalidate enctype="multipart/form-data" target="goodFormTarget">
            <input type="hidden" id="goodId" name="commentId" value="${comment.commentId}">
            <div class="panel panel-default">
                <div class="panel-heading">回复设置</div>
                <div class="panel-body">

                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">评论内容</label>
                            <div class="col-sm-10">
                                <textarea class="form-control" readonly disabled>${comment.commentContent}</textarea>
                            </div>
                        </div>
                    </div>

                    <div class="col-sm-12">
                        <div class="form-group">
                            <label for="redactor_content" class="col-sm-2 control-label">回复内容</label>

                            <div class="col-sm-10">
                            <textarea class="form-control" id="redactor_content" name="replyContent" rows="5">${reply.replyContent}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-4 col-sm-8">
                                <button type="button" class="btn btn-success col-sm-4 goods-setting">
                                    <span class="glyphicon glyphicon-ok"></span> 设置回复
                                </button>
                                <button type="button" class="btn col-sm-4" style="width: 150px; margin-left: 30px;" onclick="window.history.go(-1);">
                                    <span class="glyphicon"></span> 返回
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</layout:override>

<c:import url="../Shared/Layout.jsp">
    <c:param name="title" value="回复设置"/>
</c:import>
